﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Security;

namespace PracticeCentre.Mvc.Core.Authentication
{
    public class AspFormsAuthentication: IFormsAuthentication
    {
        /// <summary>
        /// 登入
        /// </summary>
        /// <param name="token"></param>
        /// <param name="createPersistentCookie"></param>
        public void SetAuthenticationToken(string token, bool createPersistentCookie = false)
        {
            FormsAuthentication.SetAuthCookie(token, createPersistentCookie);
        }
        /// <summary>
        /// 登出
        /// </summary>
        public void SignOut()
        {
            FormsAuthentication.SignOut();
        }
    }
}